<?
include("common/header.html");
include("../_made/le.cfg.php");
include("common/page.php");
include("common/left.html");
$ac=$GLOBALS['_ac'];
$pw=$GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
if(!$_SESSION['memberID']){}
$pid=explode("|",$_REQUEST["pid"]);
$cN=$c=$name=$class=$son=$fp=$p_name=array();
$sel="select pid,title,landid from uu_jq_ticket where pid in (".implode(",",$pid).")";
$GLOBALS['le']->query($sel);
while($row=$GLOBALS['le']->fetch_assoc()){
	$lid=$row['landid'];
	$p_name[$row['pid']]=$row["title"];
	$fp[$row['pid']]=$s->get_Dynamic_Price_Merge($row['pid'],date("Y-m-d"),2)/100;
}
$sel="select title,apply_did from uu_land where id=".$lid." limit 1";
$GLOBALS['le']->query($sel);
$GLOBALS['le']->fetch_assoc();
$ltitle=$GLOBALS['le']->f("title");
if($GLOBALS['le']->f("apply_did")!=$_SESSION['memberID']){
	exit("<script>window.location='home.html'</script>");
}
$currentPage=$_REQUEST["currentPage"]?$_REQUEST["currentPage"]:1;
$pageSize=$_REQUEST['pageSize']?$_REQUEST["pageSize"]:7;
$sel="select s.dtype,s.dtitle,dname,m.account,m.id from pft_product_sale_list s left join pft_member m on m.id=s.fid where aid=".$_SESSION['memberID']." and m.status in (0,3) and s.status=0 and length(account)<11";//." limit ".($currentPage-1)*$pageSize.",".$pageSize;
$GLOBALS['le']->query($sel);
while($row=$GLOBALS['le']->fetch_assoc()){
	if((int)$row['dtype']!=0){$class[$row['dtype']][]=$row;}
	else{$son[]=$row;}
	if(!in_array($row['dtype'],$cN)){$cN[$row['dtype']]=$row['dtitle'];}
	$name[$row['id']]=$row['account']."-".$row['dname'];
}
foreach($class as $k=>$v){
	$_t=array();
	foreach($v as $r){
		$_t[]=$r['id'];
	}
	$c[$k]=implode(",",$_t);
}
include("tpl/release.html");
include("common/footer.html");?>